package com.qys.livesMall.navy.dao.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qys.livesMall.navy.common.Constant;
import com.qys.livesMall.navy.dao.NavyTaskDao;
import com.qys.livesMall.navy.mapper.NavyTaskMapper;
import com.qys.livesMall.navy.model.entity.NavyTask;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 水军任务表 服务实现类
 * </p>
 *
 * @author
 * @since 2023-07-11
 */
@Service
public class NavyTaskDaoImpl extends ServiceImpl<NavyTaskMapper, NavyTask> implements NavyTaskDao {

    @Override
    public List<NavyTask> listNoEnd() {
        LambdaQueryWrapper<NavyTask> qw =new LambdaQueryWrapper();
        qw.select(NavyTask::getId,NavyTask::getTaskStatus,NavyTask::getTaskType);
        qw.eq(NavyTask::getTaskStatus, Constant.TaskStatus.RUNNING);
        return list(qw);
    }
}
